package lt.marsrutai.mobile.android.model;

import lt.marsrutai.mobile.android.model.enums.TransportType;

public class Transport {

    private String id;
    private TransportType type;
    private String color;
    private String localizedName;
    private String localizedNamePlural;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public TransportType getType() {
        return type;
    }

    public void setType(TransportType type) {
        this.type = type;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getLocalizedName() {
        return localizedName;
    }

    public void setLocalizedName(String localizedName) {
        this.localizedName = localizedName;
    }

    public String getLocalizedNamePlural() {
        return localizedNamePlural;
    }

    public void setLocalizedNamePlural(String localizedNamePlural) {
        this.localizedNamePlural = localizedNamePlural;
    }

    @Override
    public String toString() {
        return "Transport [id=" + id + ", type=" + type + "]";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((color == null) ? 0 : color.hashCode());
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        result = prime * result + ((localizedName == null) ? 0 : localizedName.hashCode());
        result = prime * result + ((localizedNamePlural == null) ? 0 : localizedNamePlural.hashCode());
        result = prime * result + ((type == null) ? 0 : type.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        Transport other = (Transport) obj;
        if (color == null) {
            if (other.color != null) {
                return false;
            }
        }
        else if (!color.equals(other.color)) {
            return false;
        }
        if (id == null) {
            if (other.id != null) {
                return false;
            }
        }
        else if (!id.equals(other.id)) {
            return false;
        }
        if (localizedName == null) {
            if (other.localizedName != null) {
                return false;
            }
        }
        else if (!localizedName.equals(other.localizedName)) {
            return false;
        }
        if (localizedNamePlural == null) {
            if (other.localizedNamePlural != null) {
                return false;
            }
        }
        else if (!localizedNamePlural.equals(other.localizedNamePlural)) {
            return false;
        }
        if (type != other.type) {
            return false;
        }
        return true;
    }

}
